package com.his.service.impl;

import com.his.common.Rsp;
import com.his.entity.Article;
import com.his.mapper.HisUserMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class FileService {
    @Resource
    private HisUserMapper userMapper;

    public Rsp add(Article a) {
        return userMapper.addArticle(a) > 0 ? Rsp.success(null) : Rsp.fail().msg("添加失败");
    }

    public List<Article> getAll() {
        return userMapper.getArticle();
    }
}
